@using Microsoft.AspNetCore.Authentication.AzureADB2C.UI
@using Microsoft.Extensions.Options
@inject IOptionsMonitor<AzureADB2COptions> AzureADB2COptions
@{ 
    var options = AzureADB2COptions.Get(AzureADB2CDefaults.AuthenticationScheme);
}
@if (User.Identity.IsAuthenticated)
{
    <ul class="nav navbar-nav navbar-right">
        @if (!string.IsNullOrEmpty(options.EditProfilePolicyId))
        {
            <li><a asp-area="AzureADB2C" asp-controller="Account" asp-action="EditProfile">Hello @User.Identity.Name!</a></li>
        }
        else
        {
            <li class="navbar-text">Hello @User.Identity.Name!</li>
        }
        <li><a asp-area="AzureADB2C" asp-controller="Account" asp-action="SignOut">Sign out</a></li>
    </ul>
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li><a asp-area="AzureADB2C" asp-controller="Account" asp-action="Signin">Sign in</a></li>
    </ul>
}
